package kyk.controller;

import com.kyk.entity.Product;
import kyk.dao.ProductDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.publisher.Flux;

@RestController
@RequestMapping("/product")
public class ProductController {

    @Autowired
    private ProductDao productDao;


    @RequestMapping("/findAll")
    public Flux<Product> findAll() {
        return productDao.findAll();
    }
}
